﻿<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <!-- Console appender for console based servers -->
  <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
    </layout>
  </appender>

  <!-- A catch-all rolling file appender -->
  <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
    <file value="NSsh.log" />
    <appendToFile value="true" />
    <rollingStyle value="Size" />
    <maxSizeRollBackups value="10" />
    <maximumFileSize value="1000KB" />
    <staticLogFileName value="true" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
    </layout>
  </appender>

  <!-- A selective event log appender -->
  <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
    <applicationName value="NSsh" />

    <filter type="log4net.Filter.LevelRangeFilter">
      <levelMin value="DEBUG" />
      <levelMax value="FATAL" />
    </filter>

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
    </layout>
  </appender>

  <!-- The base logging configuration -->
  <root>
    <level value="DEBUG" /> 
    <appender-ref ref="ConsoleAppender" />
    <appender-ref ref="RollingFileAppender" />
    <appender-ref ref="EventLogAppender" />
  </root>
</log4net>